package com.example.wordapp.service.impl;

import com.example.wordapp.mapper.UserMapper;
import com.example.wordapp.pojo.User;
import com.example.wordapp.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImp implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User findById(String id) {
        return userMapper.findUser(id);
    }

    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public User login(Integer id, String code) {
        return userMapper.login(id, code);
    }
}
